package org.bingo.misc;

public enum ResultState {
    OK(100, "ok"),
    UPLOAD_AVATAR_FAIL(201, "upload avatar image fail"),
    UPLOAD_VIDEO_FAIL(202, "upload video fail"),
    UPLOAD_COVER_FAIL(203, "upload cover fail"),
    USERNAME_EXISTS(301, "username is registered"),
    USERNAME_OR_PASSWORD_ERROR(302, "wrong user name or password"),
    NO_LOGIN(303, "no login or invalid token"),
    INVALID_USER_ID(304, "invalid user id"),
    INVALID_VIDEO_URL(401, "invalid video url"),
    INVALID_VIDEO_TYPE(402, "invalid video type"),
    INVALID_VIDEO_ID(403, "invalid video id"),
    VIDEO_USER_ID_NOTEQ_LOGIN_USER_ID(404, "video user id not equal login user id"),
    INVALID_COMMENT_ID(501, "invalid comment id"),
    COMMENT_USER_ID_NOTEQ_LOGIN_USER_ID(502, "comment user id not equal login user id");

    private Integer code;
    private String message;

    ResultState(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
